﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Sample09_Default" %>

<%@ Register Src="Parent.ascx" TagName="Parent" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div style="clear: both">
                    Enter the amount of TextBox:<br />
                    <asp:TextBox ID="txtQtd" Text="5" runat="server" />
                    <asp:RequiredFieldValidator ID="rfvTxtQtd" Display="Dynamic" runat="server" ControlToValidate="txtQtd" ErrorMessage="*"/><br />
                    <asp:Button ID="Button1" Text="Click here to generate the TextBoxes" 
                        runat="server" onclick="Button1_Click" />                    
                </div>
                <div style="margin-top: 20px; border-style: solid; border-width:1px; clear: both">
                    Click in the TextBox for show the value:<br />
                    <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
                        <ItemTemplate>
                            <uc1:Parent ID="Parent1" runat="server" />
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <div style="margin-top: 20px; border-style: solid; border-width:1px; clear: both">
                    Click in the TextBox for show the value:<br />
                    <asp:Repeater ID="Repeater2" runat="server" OnItemDataBound="Repeater2_ItemDataBound">
                        <ItemTemplate>
                            <uc1:Parent ID="Parent1" runat="server" />
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
